.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "OGRINFO" "1" "Feb 08, 2024" "" "GDAL"
.SH NAME
ogrinfo \- Lists information about an OGR-supported data source.
.SH SYNOPSIS
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo [\-\-help] [\-\-help\-general]
        [\-if <driver_name>] [\-json] [\-ro] [\-q] [\-where <restricted_where>|@f<ilename>]
        [\-spat <xmin> <ymin> <xmax> <ymax>] [\-geomfield <field>] [\-fid <fid>]
        [\-sql <statement>|@<filename>] [\-dialect <sql_dialect>] [\-al] [\-rl]
        [\-so|\-features] [\-fields={YES|NO}]]
        [\-geom={YES|NO|SUMMARY|WKT|ISO_WKT}] [\-oo <NAME>=<VALUE>]...
        [\-nomd] [\-listmdd] [\-mdd <domain>|all]...
        [\-nocount] [\-noextent] [\-nogeomtype] [\-wkt_format WKT1|WKT2|<other_values>]
        [\-fielddomain <name>]
        <datasource_name> [<layer> [<layer> ...]]
.ft P
.fi
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.sp
The \fBogrinfo\fP program lists various information about an OGR\-supported data
source to stdout (the terminal). By executing SQL statements it is also possible to
edit data.
.INDENT 0.0
.TP
.B \-\-help
Show this help message and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-\-help\-general
Gives a brief usage message for the generic GDAL commandline options and exit.
.UNINDENT
.INDENT 0.0
.TP
.B \-if <format>
Format/driver name to be attempted to open the input file(s). It is generally
not necessary to specify it, but it can be used to skip automatic driver
detection, when it fails to select the appropriate driver.
This option can be repeated several times to specify several candidate drivers.
Note that it does not force those drivers to open the dataset. In particular,
some drivers have requirements on file extensions.
.sp
New in version 3.2.

.UNINDENT
.INDENT 0.0
.TP
.B \-json
Display the output in json format, conforming to the
\fI\%ogrinfo.schema.json\fP
schema.
.sp
New in version 3.7.

.UNINDENT
.INDENT 0.0
.TP
.B \-ro
Open the data source in read\-only mode.
.UNINDENT
.INDENT 0.0
.TP
.B \-al
List all layers (used instead of having to give layer names
as arguments).
In the default text output, this also enables listing
all features, which can be disabled with \fI\%\-so\fP\&.
In JSON output, \-al is implicit, but listing of features must be
explicitly enabled with \fI\%\-features\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-rl
Enable random layer reading mode, i.e. iterate over features in the order
they are found in the dataset, and not layer per layer. This can be
significantly faster for some formats (for example OSM, GMLAS).
.sp
New in version 2.2.

.UNINDENT
.INDENT 0.0
.TP
.B \-so
Summary Only: suppress listing of individual features and show only
summary information like projection, schema, feature count and extents.
.UNINDENT
.INDENT 0.0
.TP
.B \-features
Enable listing of features. This has the opposite effect of \fI\%\-so\fP\&.
.sp
This option should be used with caution if using the library function
\fI\%GDALVectorInfo()\fP and/or \fI\%\-json\fP, as the whole output of
ogrinfo will be built in memory. Consequently, when used on a large
collection of features, RAM may be exhausted.
.sp
New in version 3.7.

.UNINDENT
.INDENT 0.0
.TP
.B \-q
Quiet verbose reporting of various information, including coordinate
system, layer schema, extents, and feature count.
.UNINDENT
.INDENT 0.0
.TP
.B \-where <restricted_where>
An attribute query in a restricted form of the queries used in the SQL
\fIWHERE\fP statement. Only features matching the attribute query will be
reported. Starting with GDAL 2.1, the \fB\efilename\fP syntax can be used to
indicate that the content is in the pointed filename.
.UNINDENT
.INDENT 0.0
.TP
.B \-sql <statement>
Execute the indicated SQL statement and return the result. Starting with
GDAL 2.1, the \fB@filename\fP syntax can be used to indicate that the content is
in the pointed filename. Data can also be edited with SQL INSERT, UPDATE,
DELETE, DROP TABLE, ALTER TABLE etc. Editing capabilities depend on the selected
\fBdialect\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-dialect <dialect>
SQL dialect. In some cases can be used to use (unoptimized) \fI\%OGR SQL dialect\fP instead
of the native SQL of an RDBMS by passing the \fBOGRSQL\fP dialect value.
The \fI\%SQL SQLite dialect\fP can be selected with the \fBSQLITE\fP
and \fBINDIRECT_SQLITE\fP dialect values, and this can be used with any datasource.
.UNINDENT
.INDENT 0.0
.TP
.B \-spat <xmin> <ymin> <xmax> <ymax>
The area of interest. Only features within the rectangle will be reported.
.UNINDENT
.INDENT 0.0
.TP
.B \-geomfield <field>
Name of the geometry field on which the spatial filter operates.
.UNINDENT
.INDENT 0.0
.TP
.B \-fid <fid>
If provided, only the feature with this feature id will be reported.
Operates exclusive of the spatial or attribute queries. Note: if you want
to select several features based on their feature id, you can also use the
fact the \(aqfid\(aq is a special field recognized by OGR SQL. So, \fI\-where \(dqfid in (1,3,5)\(dq\fP
would select features 1, 3 and 5.
.UNINDENT
.INDENT 0.0
.TP
.B \-fields=YES|NO
If set to \fBNO\fP, the feature dump will not display field values. Default value
is \fBYES\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-fielddomain <domain_name>
New in version 3.3.

.sp
Display details about a field domain.
.UNINDENT
.INDENT 0.0
.TP
.B \-geom=YES|NO|SUMMARY|WKT|ISO_WKT
If set to \fBNO\fP, the feature dump will not display the geometry. If set to
\fBSUMMARY\fP, only a summary of the geometry will be displayed. If set to
\fBYES\fP or \fBISO_WKT\fP, the geometry will be reported in full OGC WKT format.
If set to \fBWKT\fP the geometry will be reported in legacy \fBWKT\fP\&. Default
value is \fBYES\fP\&. (WKT and \fBISO_WKT\fP are available starting with GDAL 2.1,
which also changes the default to ISO_WKT)
.UNINDENT
.INDENT 0.0
.TP
.B \-oo <NAME>=<VALUE>
Dataset open option (format\-specific)
.UNINDENT
.INDENT 0.0
.TP
.B \-nomd
Suppress metadata printing. Some datasets may contain a lot of metadata
strings.
.UNINDENT
.INDENT 0.0
.TP
.B \-listmdd
List all metadata domains available for the dataset.
.UNINDENT
.INDENT 0.0
.TP
.B \-mdd <domain>
Report metadata for the specified domain. \fBall\fP can be used to report
metadata in all domains.
.UNINDENT
.INDENT 0.0
.TP
.B \-nocount
Suppress feature count printing.
.UNINDENT
.INDENT 0.0
.TP
.B \-noextent
Suppress spatial extent printing.
.UNINDENT
.INDENT 0.0
.TP
.B \-nogeomtype
Suppress layer geometry type printing.
.sp
New in version 3.1.

.UNINDENT
.INDENT 0.0
.TP
.B \-\-formats
List all vector formats supported by this GDAL build (read\-only and
read\-write) and exit. The format support is indicated as follows:
.INDENT 7.0
.IP \(bu 2
\fBro\fP is read\-only driver
.IP \(bu 2
\fBrw\fP is read or write (i.e. supports \fI\%GDALDriver::CreateCopy()\fP)
.IP \(bu 2
\fBrw+\fP is read, write and update (i.e. supports \fI\%GDALDriver::Create()\fP)
.IP \(bu 2
A \fBv\fP is appended for formats supporting virtual IO (\fB/vsimem\fP, \fB/vsigzip\fP, \fB/vsizip\fP, etc).
.IP \(bu 2
A \fBs\fP is appended for formats supporting subdatasets.
.UNINDENT
.sp
The order in which drivers are listed is the one in which they are registered,
which determines the order in which they are successively probed when opening
a dataset. Most of the time, this order does not matter, but in some situations,
several drivers may recognize the same file. The \fB\-if\fP option of some utilities
can be specified to restrict opening the dataset with a subset of drivers (generally one).
Note that it does not force those drivers to open the dataset. In particular,
some drivers have requirements on file extensions.
Alternatively, the \fI\%GDAL_SKIP\fP configuration option can also be used
to exclude one or several drivers.
.UNINDENT
.INDENT 0.0
.TP
.B \-wkt_format <format>
The WKT format used to display the SRS.
Currently supported values for the \fBformat\fP are:
.sp
\fBWKT1\fP
.sp
\fBWKT2\fP (latest WKT version, currently \fIWKT2_2018\fP)
.sp
\fBWKT2_2015\fP
.sp
\fBWKT2_2018\fP
.sp
New in version 3.0.0.

.UNINDENT
.INDENT 0.0
.TP
.B <datasource_name>
The data source to open. May be a filename, directory or other virtual
name. See the OGR Vector Formats list for supported datasources.
.UNINDENT
.INDENT 0.0
.TP
.B <layer>
One or more layer names may be reported.  If no layer names are passed then
ogrinfo will report a list of available layers (and their layer wide
geometry type). If layer name(s) are given then their extents, coordinate
system, feature count, geometry type, schema and all features matching
query parameters will be reported to the terminal. If no query parameters
are provided, all features are reported.
.UNINDENT
.sp
Geometries are reported in OGC WKT format.
.SH C API
.sp
This utility is also callable from C with \fI\%GDALVectorInfo()\fP\&.
.sp
New in version 3.7.

.SH EXAMPLES
.sp
Example of reporting the names of the layers in a NTF file:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo wrk/SHETLAND_ISLANDS.NTF

# INFO: Open of \(gawrk/SHETLAND_ISLANDS.NTF\(aq
# using driver \(gaUK .NTF\(aq successful.
# 1: BL2000_LINK (Line String)
# 2: BL2000_POLY (None)
# 3: BL2000_COLLECTIONS (None)
# 4: FEATURE_CLASSES (None)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Example of retrieving a summary (\fB\-so\fP) of a layer without showing details about every single feature:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo \e
  \-so \e
  natural_earth_vector.gpkg \e
  ne_10m_admin_0_antarctic_claim_limit_lines

  # INFO: Open of \(ganatural_earth_vector.gpkg\(aq
  #      using driver \(gaGPKG\(aq successful.

  # Layer name: ne_10m_admin_0_antarctic_claim_limit_lines
  # Geometry: Line String
  # Feature Count: 23
  # Extent: (\-150.000000, \-90.000000) \- (160.100000, \-60.000000)
  # Layer SRS WKT:
  # GEOGCS[\(dqWGS 84\(dq,
  #     DATUM[\(dqWGS_1984\(dq,
  #         SPHEROID[\(dqWGS 84\(dq,6378137,298.257223563,
  #             AUTHORITY[\(dqEPSG\(dq,\(dq7030\(dq]],
  #         AUTHORITY[\(dqEPSG\(dq,\(dq6326\(dq]],
  #     PRIMEM[\(dqGreenwich\(dq,0,
  #         AUTHORITY[\(dqEPSG\(dq,\(dq8901\(dq]],
  #     UNIT[\(dqdegree\(dq,0.0174532925199433,
  #         AUTHORITY[\(dqEPSG\(dq,\(dq9122\(dq]],
  #     AUTHORITY[\(dqEPSG\(dq,\(dq4326\(dq]]
  # FID Column = fid
  # Geometry Column = geom
  # type: String (15.0)
  # scalerank: Integer (0.0)
  # featurecla: String (50.0)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Example of retrieving information on a file in JSON format without showing details about every single feature:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo \-json poly.shp
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
  \(dqdescription\(dq:\(dqautotest/ogr/data/poly.shp\(dq,
  \(dqdriverShortName\(dq:\(dqESRI Shapefile\(dq,
  \(dqdriverLongName\(dq:\(dqESRI Shapefile\(dq,
  \(dqlayers\(dq:[
    {
      \(dqname\(dq:\(dqpoly\(dq,
      \(dqmetadata\(dq:{
        \(dq\(dq:{
          \(dqDBF_DATE_LAST_UPDATE\(dq:\(dq2018\-08\-02\(dq
        },
        \(dqSHAPEFILE\(dq:{
          \(dqSOURCE_ENCODING\(dq:\(dq\(dq
        }
      },
      \(dqgeometryFields\(dq:[
        {
          \(dqname\(dq:\(dq\(dq,
          \(dqtype\(dq:\(dqPolygon\(dq,
          \(dqnullable\(dq:true,
          \(dqextent\(dq:[
            478315.53125,
            4762880.5,
            481645.3125,
            4765610.5
          ],
          \(dqcoordinateSystem\(dq:{
            \(dqwkt\(dq:\(dqPROJCRS[\e\(dqOSGB36 / British National Grid\e\(dq,BASEGEOGCRS[\e\(dqOSGB36\e\(dq,DATUM[\e\(dqOrdnance Survey of Great Britain 1936\e\(dq,ELLIPSOID[\e\(dqAiry 1830\e\(dq,6377563.396,299.3249646,LENGTHUNIT[\e\(dqmetre\e\(dq,1]]],PRIMEM[\e\(dqGreenwich\e\(dq,0,ANGLEUNIT[\e\(dqdegree\e\(dq,0.0174532925199433]],ID[\e\(dqEPSG\e\(dq,4277]],CONVERSION[\e\(dqBritish National Grid\e\(dq,METHOD[\e\(dqTransverse Mercator\e\(dq,ID[\e\(dqEPSG\e\(dq,9807]],PARAMETER[\e\(dqLatitude of natural origin\e\(dq,49,ANGLEUNIT[\e\(dqdegree\e\(dq,0.0174532925199433],ID[\e\(dqEPSG\e\(dq,8801]],PARAMETER[\e\(dqLongitude of natural origin\e\(dq,\-2,ANGLEUNIT[\e\(dqdegree\e\(dq,0.0174532925199433],ID[\e\(dqEPSG\e\(dq,8802]],PARAMETER[\e\(dqScale factor at natural origin\e\(dq,0.9996012717,SCALEUNIT[\e\(dqunity\e\(dq,1],ID[\e\(dqEPSG\e\(dq,8805]],PARAMETER[\e\(dqFalse easting\e\(dq,400000,LENGTHUNIT[\e\(dqmetre\e\(dq,1],ID[\e\(dqEPSG\e\(dq,8806]],PARAMETER[\e\(dqFalse northing\e\(dq,\-100000,LENGTHUNIT[\e\(dqmetre\e\(dq,1],ID[\e\(dqEPSG\e\(dq,8807]]],CS[Cartesian,2],AXIS[\e\(dq(E)\e\(dq,east,ORDER[1],LENGTHUNIT[\e\(dqmetre\e\(dq,1]],AXIS[\e\(dq(N)\e\(dq,north,ORDER[2],LENGTHUNIT[\e\(dqmetre\e\(dq,1]],USAGE[SCOPE[\e\(dqEngineering survey, topographic mapping.\e\(dq],AREA[\e\(dqUnited Kingdom (UK) \- offshore to boundary of UKCS within 49°45\(aqN to 61°N and 9°W to 2°E; onshore Great Britain (England, Wales and Scotland). Isle of Man onshore.\e\(dq],BBOX[49.75,\-9,61.01,2.01]],ID[\e\(dqEPSG\e\(dq,27700]]\(dq,
            \(dqprojjson\(dq:{
              \(dq$schema\(dq:\(dqhttps://proj.org/schemas/v0.6/projjson.schema.json\(dq,
              \(dqtype\(dq:\(dqProjectedCRS\(dq,
              \(dqname\(dq:\(dqOSGB36 / British National Grid\(dq,
              \(dqbase_crs\(dq:{
                \(dqname\(dq:\(dqOSGB36\(dq,
                \(dqdatum\(dq:{
                  \(dqtype\(dq:\(dqGeodeticReferenceFrame\(dq,
                  \(dqname\(dq:\(dqOrdnance Survey of Great Britain 1936\(dq,
                  \(dqellipsoid\(dq:{
                    \(dqname\(dq:\(dqAiry 1830\(dq,
                    \(dqsemi_major_axis\(dq:6377563.396,
                    \(dqinverse_flattening\(dq:299.3249646
                  }
                },
                \(dqcoordinate_system\(dq:{
                  \(dqsubtype\(dq:\(dqellipsoidal\(dq,
                  \(dqaxis\(dq:[
                    {
                      \(dqname\(dq:\(dqGeodetic latitude\(dq,
                      \(dqabbreviation\(dq:\(dqLat\(dq,
                      \(dqdirection\(dq:\(dqnorth\(dq,
                      \(dqunit\(dq:\(dqdegree\(dq
                    },
                    {
                      \(dqname\(dq:\(dqGeodetic longitude\(dq,
                      \(dqabbreviation\(dq:\(dqLon\(dq,
                      \(dqdirection\(dq:\(dqeast\(dq,
                      \(dqunit\(dq:\(dqdegree\(dq
                    }
                  ]
                },
                \(dqid\(dq:{
                  \(dqauthority\(dq:\(dqEPSG\(dq,
                  \(dqcode\(dq:4277
                }
              },
              \(dqconversion\(dq:{
                \(dqname\(dq:\(dqBritish National Grid\(dq,
                \(dqmethod\(dq:{
                  \(dqname\(dq:\(dqTransverse Mercator\(dq,
                  \(dqid\(dq:{
                    \(dqauthority\(dq:\(dqEPSG\(dq,
                    \(dqcode\(dq:9807
                  }
                },
                \(dqparameters\(dq:[
                  {
                    \(dqname\(dq:\(dqLatitude of natural origin\(dq,
                    \(dqvalue\(dq:49,
                    \(dqunit\(dq:\(dqdegree\(dq,
                    \(dqid\(dq:{
                      \(dqauthority\(dq:\(dqEPSG\(dq,
                      \(dqcode\(dq:8801
                    }
                  },
                  {
                    \(dqname\(dq:\(dqLongitude of natural origin\(dq,
                    \(dqvalue\(dq:\-2,
                    \(dqunit\(dq:\(dqdegree\(dq,
                    \(dqid\(dq:{
                      \(dqauthority\(dq:\(dqEPSG\(dq,
                      \(dqcode\(dq:8802
                    }
                  },
                  {
                    \(dqname\(dq:\(dqScale factor at natural origin\(dq,
                    \(dqvalue\(dq:0.9996012717,
                    \(dqunit\(dq:\(dqunity\(dq,
                    \(dqid\(dq:{
                      \(dqauthority\(dq:\(dqEPSG\(dq,
                      \(dqcode\(dq:8805
                    }
                  },
                  {
                    \(dqname\(dq:\(dqFalse easting\(dq,
                    \(dqvalue\(dq:400000,
                    \(dqunit\(dq:\(dqmetre\(dq,
                    \(dqid\(dq:{
                      \(dqauthority\(dq:\(dqEPSG\(dq,
                      \(dqcode\(dq:8806
                    }
                  },
                  {
                    \(dqname\(dq:\(dqFalse northing\(dq,
                    \(dqvalue\(dq:\-100000,
                    \(dqunit\(dq:\(dqmetre\(dq,
                    \(dqid\(dq:{
                      \(dqauthority\(dq:\(dqEPSG\(dq,
                      \(dqcode\(dq:8807
                    }
                  }
                ]
              },
              \(dqcoordinate_system\(dq:{
                \(dqsubtype\(dq:\(dqCartesian\(dq,
                \(dqaxis\(dq:[
                  {
                    \(dqname\(dq:\(dqEasting\(dq,
                    \(dqabbreviation\(dq:\(dqE\(dq,
                    \(dqdirection\(dq:\(dqeast\(dq,
                    \(dqunit\(dq:\(dqmetre\(dq
                  },
                  {
                    \(dqname\(dq:\(dqNorthing\(dq,
                    \(dqabbreviation\(dq:\(dqN\(dq,
                    \(dqdirection\(dq:\(dqnorth\(dq,
                    \(dqunit\(dq:\(dqmetre\(dq
                  }
                ]
              },
              \(dqscope\(dq:\(dqEngineering survey, topographic mapping.\(dq,
              \(dqarea\(dq:\(dqUnited Kingdom (UK) \- offshore to boundary of UKCS within 49°45\(aqN to 61°N and 9°W to 2°E; onshore Great Britain (England, Wales and Scotland). Isle of Man onshore.\(dq,
              \(dqbbox\(dq:{
                \(dqsouth_latitude\(dq:49.75,
                \(dqwest_longitude\(dq:\-9,
                \(dqnorth_latitude\(dq:61.01,
                \(dqeast_longitude\(dq:2.01
              },
              \(dqid\(dq:{
                \(dqauthority\(dq:\(dqEPSG\(dq,
                \(dqcode\(dq:27700
              }
            },
            \(dqdataAxisToSRSAxisMapping\(dq:[
              1,
              2
            ]
          }
        }
      ],
      \(dqfeatureCount\(dq:10,
      \(dqfields\(dq:[
        {
          \(dqname\(dq:\(dqAREA\(dq,
          \(dqtype\(dq:\(dqReal\(dq,
          \(dqwidth\(dq:12,
          \(dqprecision\(dq:3,
          \(dqnullable\(dq:true,
          \(dquniqueConstraint\(dq:false
        },
        {
          \(dqname\(dq:\(dqEAS_ID\(dq,
          \(dqtype\(dq:\(dqInteger64\(dq,
          \(dqwidth\(dq:11,
          \(dqnullable\(dq:true,
          \(dquniqueConstraint\(dq:false
        },
        {
          \(dqname\(dq:\(dqPRFEDEA\(dq,
          \(dqtype\(dq:\(dqString\(dq,
          \(dqwidth\(dq:16,
          \(dqnullable\(dq:true,
          \(dquniqueConstraint\(dq:false
        }
      ]
    }
  ],
  \(dqmetadata\(dq:{
  },
  \(dqdomains\(dq:{
  },
  \(dqrelationships\(dq:{
  }
}
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Example of using an attribute query to restrict the output of the features
in a layer:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo \-ro \e
    \-where \(aqGLOBAL_LINK_ID=185878\(aq \e
    wrk/SHETLAND_ISLANDS.NTF BL2000_LINK

# INFO: Open of \(gawrk/SHETLAND_ISLANDS.NTF\(aq
# using driver \(gaUK .NTF\(aq successful.
#
# Layer name: BL2000_LINK
# Geometry: Line String
# Feature Count: 1
# Extent: (419794.100000, 1069031.000000) \- (419927.900000, 1069153.500000)
# Layer SRS WKT:
# PROJCS[\(dqOSGB 1936 / British National Grid\(dq,
# GEOGCS[\(dqOSGB 1936\(dq,
# DATUM[\(dqOSGB_1936\(dq,
# SPHEROID[\(dqAiry 1830\(dq,6377563.396,299.3249646]],
# PRIMEM[\(dqGreenwich\(dq,0],
# UNIT[\(dqdegree\(dq,0.0174532925199433]],
# PROJECTION[\(dqTransverse_Mercator\(dq],
# PARAMETER[\(dqlatitude_of_origin\(dq,49],
# PARAMETER[\(dqcentral_meridian\(dq,\-2],
# PARAMETER[\(dqscale_factor\(dq,0.999601272],
# PARAMETER[\(dqfalse_easting\(dq,400000],
# PARAMETER[\(dqfalse_northing\(dq,\-100000],
# UNIT[\(dqmetre\(dq,1]]
# LINE_ID: Integer (6.0)
# GEOM_ID: Integer (6.0)
# FEAT_CODE: String (4.0)
# GLOBAL_LINK_ID: Integer (10.0)
# TILE_REF: String (10.0)
# OGRFeature(BL2000_LINK):2
# LINE_ID (Integer) = 2
# GEOM_ID (Integer) = 2
# FEAT_CODE (String) = (null)
# GLOBAL_LINK_ID (Integer) = 185878
# TILE_REF (String) = SHETLAND I
# LINESTRING (419832.100 1069046.300,419820.100 1069043.800,419808.300
# 1069048.800,419805.100 1069046.000,419805.000 1069040.600,419809.400
# 1069037.400,419827.400 1069035.600,419842 1069031,419859.000
# 1069032.800,419879.500 1069049.500,419886.700 1069061.400,419890.100
# 1069070.500,419890.900 1069081.800,419896.500 1069086.800,419898.400
# 1069092.900,419896.700 1069094.800,419892.500 1069094.300,419878.100
# 1069085.600,419875.400 1069087.300,419875.100 1069091.100,419872.200
# 1069094.600,419890.400 1069106.400,419907.600 1069112.800,419924.600
# 1069133.800,419927.900 1069146.300,419927.600 1069152.400,419922.600
# 1069153.500,419917.100 1069153.500,419911.500 1069153.000,419908.700
# 1069152.500,419903.400 1069150.800,419898.800 1069149.400,419894.800
# 1069149.300,419890.700 1069149.400,419890.600 1069149.400,419880.800
# 1069149.800,419876.900 1069148.900,419873.100 1069147.500,419870.200
# 1069146.400,419862.100 1069143.000,419860 1069142,419854.900
# 1069138.600,419850 1069135,419848.800 1069134.100,419843
# 1069130,419836.200 1069127.600,419824.600 1069123.800,419820.200
# 1069126.900,419815.500 1069126.900,419808.200 1069116.500,419798.700
# 1069117.600,419794.100 1069115.100,419796.300 1069109.100,419801.800
# 1069106.800,419805.000  1069107.300)
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Example of updating a value of an attribute in a shapefile with SQL by using the SQLite dialect:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo test.shp \-dialect sqlite \-sql \(dqupdate test set attr=\(aqbar\(aq where attr=\(aqfoo\(aq\(dq
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Adding a column to an input file:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ogrinfo input.shp \-sql \(dqALTER TABLE input ADD fieldX float\(dq
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AUTHOR
Frank Warmerdam <warmerdam@pobox.com>, Silke Reimer <silke@intevation.de>
.SH COPYRIGHT
1998-2024
.\" Generated by docutils manpage writer.
.
